Repository navigation
docs(skills): the data-hooks query example filters on owner_id, not a hand-named owner - #33726
Conversation
… hand-named owner
The ctx.api.object query-shape example in objectstack-data's data-hooks
reference filtered task on { owner: uid }, a hand-named owner field beside
the injected owner_id. It now filters on owner_id. The objectstack-data eval
on a required user field with deleteBehavior restrict named that field
owner (the agent holding the ticket); it now names a reviewer, a role apart
from the record owner.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5nj2HhB4M8Anj58gqj
|
domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb Contract reviewServed-tier: Inputs read: card #33722 (body and its three comments: triage, claim, os-dev-report), PR #33726 (body, file list of 3, net diff +13/-3 against Check-runs on the head at review time, 39 listed: every completed run is ① Derived judgments
② Semver level
Clause-②: no — the line is on the PR body and on the changeset, bare, and is right: no published schema, no accept-set or runtime behaviour changes, and nothing is narrowed. ③ Boundary flags
④ Design judgmentskills/objectstack-data/references/data-hooks.md — holds.
skills/objectstack-data/evals/objects-fields-relationships.json — holds.
Findings:
No must-fix, no should-fix. Nits alone end the round. Implemented-by: VERDICT: PASS Adopted by the seat 2026-11-15T08:16Z · isolated sub-agent at CONTRACT_REVIEW_TIER (served model verified by the seat) · Ruling-ref: Leehom card cmsg_01TenzsRopZj4jMbvjX8uz1XFhuiZmTH8VFgMmHRmpiGAb, option A, tapped 2026-11-14T15:37Z |
|
domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb 席位核对Verdict: ACCEPT, seat lands (low-risk skills arm, Tier S) · head
|
…n open must-fix or should-fix (objectstack-ai#33736) <!-- claude-projects-attribution: {"github_login":"os-project-manager"} --> _Requested by **Leehom** · [project thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XLnqJDfSWuHodQt1yWeTRqD)_ Fixes objectstack-ai#33604 domain:skills#1 · os-project-manager · session_01FEkQ5pJkb8Rbcrj6yEXfiA Clause-②: no Metadata-protocol: none ## 维护者速读 - **改了什么**:合并队列守卫对 Tier S 的复核记录多读三件事:记录虽写 PASS 但同时列着未结的 must-fix 或 should-fix,不放行;记录别处(任一标题、小写/列表/表格/标题里的 verdict 行、单独一行 FAIL)写着 FAIL,不放行;题头之上的 `VERDICT:` 行也计数。同一 head 上后一条把它们关掉的 delta 记录才放行(引用前一条记录的等级、写明 closed 的不算未结)。规则文字的一句(contract-review.md ①)由 objectstack-ai#33731 带,本 PR 不碰该文件。 - **为什么改**:规则说 should-fix 要先做 delta 复核再落地,守卫却只认 PASS 这个词,带着未结 should-fix 的 PASS 记录能直接入队(卡 objectstack-ai#33604,加上 objectstack-ai#33687 复核记录 6890532571 的 N2、N3)。 - **风险与回滚**:只收紧放行面,不放宽:原来清不了的照样清不了。读不懂的等级一律不放行(fail closed),复核者要按 `S1 (should-fix)` 或 `No must-fix, no should-fix.` 的写法落记录,简报模板已同步写明。回滚即 revert。 - **先看**:`scripts/pm/check-half-states.mjs` 的 `contractReviewRecordReading`(唯一读法);`scripts/pm/check-governed-queue-guard.mjs` 的 `recordPassVerdict`;`record-recognisers.mjs` 的 `BRIEF_GRADE_LINES`(教复核者的写法)。 - **两分钟验证**:`node scripts/pm/check-governed-queue-guard.mjs --self-test && node scripts/pm/check-half-states.mjs --self-test && node scripts/pm/record-recognisers.mjs --self-test`,预期三个全绿(526 / 5268 / 389 例)。 - **需要你做的**:无,席位落地(非受管面)。 ## What changes 1. **One reader, `contractReviewRecordReading`** (`scripts/pm/check-half-states.mjs`, beside `contractReviewVerdictLines`, on the same regexes; ⛔ no second parser). For a comment with a `## Contract review` heading it returns: - `verdicts`: every explicit `VERDICT:` line's word, over the WHOLE comment (N3: lines above the heading count). `contractReviewVerdictLines` is now a view of this. - `failSpellings`: lines that read FAIL outside the explicit form (N2), in every verdict-bearing shape measured: a caps FAIL anywhere in any `## Contract review` heading's tail; a `verdict` key in any case under a heading mark, quote, bullet or emphasis, after up to two words (`Overall verdict:`), with a parenthetical (`Verdict (delta):`), with `:`, a dash, `=` or `is`, reading FAIL, FAILED or FAILS; a table row with a verdict cell and a FAIL cell in either order; a bare `FAIL` line followed only by a separator, a full stop or `!`. Prose that merely mentions FAIL (`- Newest FAIL over an older PASS`, `FAIL, none or two refuse`) is not one. - `findings`: per mention of the hyphenated grade word: `open` (named with its grade at the line's lead: `**S1 (should-fix) — …**`, `- **S2 (should-fix) — …**`, `M1 (must-fix, …)`, `- should-fix: …`); `closed` (a named finding whose line goes on to say closed and ENDS there: only closing emphasis, `.`, `;` or `on this head` / `at this head` / `here` may follow, and a full stop that closes the bold title may lead a new sentence: `- **S1 (should-fix): closed.**`); `none` (`must-fix: none`, same terms); a title that merely opens with either word (`closed in part`, `Closed PRs …`, `none of …`) stays OPEN; `cited` (inside `(record ID: …)`, the measured delta preamble); negated (`No must-fix, no should-fix.`, `No new should-fix.`, `Neither must-fix nor should-fix.`, `0 must-fix`, a second grade carried by `or` or `/`; after a comma or `and` the second grade needs its own `no`); or `unreadable` (any other mention, e.g. `Two should-fix, both …` or `No must-fix, should-fix S1 and S2 below.`). 2. **The guard decides** (`recordPassVerdict`, every Tier S leg including the low-risk arm): after the existing one-PASS-line rule, a record also refuses (`not-pass`, naming the comment id) when it carries a FAIL spelling, names an open must-fix or should-fix, has an unattributable grade, or its reading lacks the grade fields (fail closed). The recogniser loader now requires `reading` (re-exported by `record-recognisers.mjs`) in place of `verdictLines`. A later same-head delta record that cites the prior record's grades, names what it closes (`S1: closed`, `S1 (should-fix): closed`) and raises nothing new clears, because the locator already reads the newest same-head record. The unattributable refusal names the shapes the reader takes; it never asks for a sentence the record may already carry. 3. **The brief teaches the grammar** (`record-recognisers.mjs` `BRIEF_GRADE_LINES`, +3 lines): spell a finding `S1 (should-fix) — …`, a clean round `No must-fix, no should-fix.`, and close by id alone. ## Acceptance notes - **Round 3 (review 6892305129, S1 and N2).** S1: the round-2 closed/none reading took the first word after the grade, so `S1 (should-fix): closed in part, still open for X`, `**S2 (should-fix) — Closed PRs are still read as merged…**`, `- **S2 (should-fix) — none of the three ablations ran…**`, `S1 (should-fix) — closed on the prior head, reopened by this delta` and `- should-fix: none of S1, S2 is fixed` cleared; the state word must now end the finding, and each of those six refuses again (pinned, with a control that `closed here.`, a closed bold title followed by a sentence, and `closed;` still clear). N2 (cheap ones taken): `Verdict: FAILED`, `Verdict is FAIL`, `Verdict (delta): FAIL`, `| FAIL | Verdict |`, `FAIL!` and a late FAIL in a heading tail (`— PASS withdrawn, FAIL`) now refuse. Not taken: a verdict column carried by a header row (needs table state). Accepted nits N1, N3, N4 unchanged; N3's `- Leg verdict: fail-closed …` refusal stands (fail closed). - **Round 2 (review 6891926185, S1 and S2).** S1: the clean delta 6891542450 (objectstack-ai#33711's final record, nits only) was refused for its preamble `(record 6891274033: PASS, should-fix S3, nits N7 and N8)`; citations, named-and-closed lines and `No new should-fix.` now read clean, pinned on the measured preamble. S2: `### VERDICT: FAIL`, `## Verdict: FAIL`, `| Verdict | FAIL |`, `Overall verdict: FAIL`, `Verdict — FAIL`, `FAIL.` and `**FAIL.**` now refuse beside one PASS line, and `No must-fix, should-fix S1 and S2 below.` is unreadable (fail closed), one pin each. Nits taken: N1 (`Neither … nor`, `0 must-fix`, `must-fix: none`, `- should-fix: none` read clean), N3 (every heading's tail is read). Not taken: N2 (the grade is read off the hyphenated word only; the brief spells it and every measured record uses it), N4 (a prose bullet opening `- FAIL — …` refuses; fail closed, a repost cures it). - **Grammar measured, not assumed.** Read on the real records of PRs objectstack-ai#33686 (6890432656), objectstack-ai#33687 (6890532571), objectstack-ai#33688 (6890622635 round 1, 6890939010 delta) and objectstack-ai#33711 (6890932729) with the new reader, plus the review's own measurement of objectstack-ai#33711's deltas 6891274033 and 6891542450, objectstack-ai#33720 (6891083453) and objectstack-ai#33726 (6891576194): - objectstack-ai#33686, objectstack-ai#33687: one PASS, no FAIL spelling, no open grade, nothing unreadable → still clear. - objectstack-ai#33688 round 1: S1, S2 should-fix open → refused (correct: they earned a delta). - objectstack-ai#33688 delta 6890939010: S1, S2, N1 closed (`- **S1: closed.**`, no grade word), but it raises **S3 (should-fix, the seat's, no head change)** on the PR body → refused. If objectstack-ai#33688 is still queued when this lands, it needs a later same-head record closing S3. - objectstack-ai#33711 round 1: S1, S2 should-fix open plus the count line `No must-fix. Two should-fix, both …` (unreadable) → refused; delta 6891274033 raises S3 → refused; delta 6891542450 (cites the prior grades, closes S3, `No must-fix. No should-fix.`) → clears. - objectstack-ai#33720, objectstack-ai#33726: nits only → clear. - **Rule sentence owed, carried by PR objectstack-ai#33731.** The seat moved `contract-review.md` to objectstack-ai#33718 (PR objectstack-ai#33731) mid-round, so this PR leaves it untouched. The sentence the rule owes, measured to fit line 51 in place (63/63 lines, 119/120 bytes, paid by dropping 「两条」 and the second 「Tier」): `- 请审/求批与落地前检,过则 Tier S 入队、H 等人批:① 现 head 同形达档 PASS 在案,无前两级。` (前两级 = must-fix/should-fix, the term line 45 already uses). `check-skill-line-ratchet` was green with it on an earlier head (148b0ce6, dropped). - **Fail closed costs a wording rule.** A record that quotes the grade word in prose (`the should-fix rule says …`) is refused as unreadable. The brief now names the two shapes the reader accepts; a seat can always repost a clean record. - **Not changed:** the H43 patrol (`contractReviewVerdictOf`, first match under the heading) and `check-owed-reviews.mjs` still read no grades; that is follow-up F1 of record 6890532571, not this card. - Ablation, round 3 (on 38cc292, guard self-test, restored, `git diff HEAD` empty): the state-word tail reverted to `(closed|none)\b` → the r3 titled-open row red (all six CLEARED); the heading-tail caps FAIL deleted → the r3 N2 row red. - Ablation, round 2 (each reader branch mutated on 7c2fb52, guard self-test run, restored, `git diff HEAD` empty): citation off → the measured-delta row red; closed/none state off → 2 rows red; table-cell regex off → the S2 FAIL-forms row red; comma carrying the denial → the S2 comma row red. - Ablation, round 1 (each guard branch mutated with `scripts/ablation-replace.mjs`, run, restored; `git diff HEAD` empty after each): open-grade branch off → 3 objectstack-ai#33604 rows red; FAIL-spelling branch off → 2 N2 rows red; unattributable branch off → 1 row red; reading below the heading only → the N3 row red. ## Verification - `dispatch-gates --tier`: no path-derived model mandate (floor sonnet, default opus); built on the claim's default. - `check-governed-merges --branch claude/project-thread-78jrbs`: **NOT governed** (0 of 3 paths on the register; `scripts/pm/**` is not a row); 190 changed lines, under 3000. Ordinary queue landing. - Self-tests on the final head 38cc292: `check-governed-queue-guard --self-test` 526 pass; `check-half-states --self-test` 5268 pass (11 new H43 rows); `record-recognisers --self-test` 389 pass (1 new cross-tool pin: the brief's shapes are the guard's). <details><summary>Derived gate list on head 38cc292: 49 derived, 49 run green, 0 NOT MEASURED</summary> `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` on head 38cc292 (round 3, after merging `origin/main` again at 34c6eec; main's nine new commits touch none of the three files), each exit captured before any pipe; `--ran` reconciliation: "49 derived famil(ies) accounted for — 49 run, 0 NOT-MEASURED". `check:doc-formula-expressions` ran after `pnpm --filter "@objectstack/lint..." build` under the verify lock. The two `check-closing-keyword-parity` runs overlapped a five-second ablation window of the reader, a file they do not read; both were re-run on the restored tree, exit 0. ```text node scripts/check-closing-keyword-parity.mjs :: exit 0 node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0 node scripts/check-comment-mask-corpus.mjs :: exit 0 node scripts/check-declaration-mirrors.mjs :: exit 0 node scripts/check-declaration-mirrors.mjs --self-test :: exit 0 node scripts/check-issue-citations.mjs :: exit 0 node scripts/check-platform-checklist-watchdog.mjs :: exit 0 node scripts/check-platform-checklist-watchdog.mjs --self-test :: exit 0 node scripts/check-release-section-coverage.mjs :: exit 0 node scripts/check-release-section-coverage.mjs --strict :: exit 0 node scripts/check-self-test-wired.mjs :: exit 0 node scripts/check-self-test-wired.mjs --self-test :: exit 0 node scripts/check-self-test-workflow-commands.mjs :: exit 0 node scripts/check-self-test-workflow-commands.mjs --self-test :: exit 0 node scripts/check-whole-set-label-write.mjs :: exit 0 node scripts/check-whole-set-label-write.mjs --self-test :: exit 0 node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0 node scripts/ci/scheduled-full-run.mjs --self-test :: exit 0 node scripts/pm/bare-root-worklist.mjs --self-test :: exit 0 node scripts/pm/board-snapshot.mjs --self-test :: exit 0 node scripts/pm/check-governed-queue-guard.mjs --self-test :: exit 0 node scripts/pm/sweep-closed-cards.mjs --self-test :: exit 0 node scripts/render-release-coverage-anchor.mjs --self-test :: exit 0 pnpm check:agent-test-spelling :: exit 0 pnpm check:bash32-floor :: exit 0 pnpm check:ci-filter-parity :: exit 0 pnpm check:cli-command-ids :: exit 0 pnpm check:closing-target-claim :: exit 0 pnpm check:commit-card-trailers :: exit 0 pnpm check:cross-package-test-inputs :: exit 0 pnpm check:driver-memory-census :: exit 0 pnpm check:entry-guard :: exit 0 pnpm check:gitlink-declared :: exit 0 pnpm check:issue-citations :: exit 0 pnpm check:nul-bytes :: exit 0 pnpm check:parse-guard :: exit 0 pnpm check:partof-closing-keyword :: exit 0 pnpm check:platform-checklist :: exit 0 pnpm check:pm-dispatch-gates :: exit 0 pnpm check:pm-half-states :: exit 0 pnpm check:pm-post-stamped :: exit 0 pnpm check:pm-record-recognisers :: exit 0 pnpm check:pnpm-filter-targets :: exit 0 pnpm check:pnpm-flag-spellings :: exit 0 pnpm check:ratchet-remedy-authority :: exit 0 pnpm check:refd-timer-probe :: exit 0 pnpm check:scripts-symbol-anchors :: exit 0 pnpm check:single-claim-paths :: exit 0 pnpm check:watch-hint-literal :: exit 0 ``` - Rounds 1 and 2 ran the same 49 on bbe4fba and 7c2fb52, all green; an earlier pass on 148b0ce6 (with the `contract-review.md` line, since dropped) was stopped at 41 of 55, all green. </details> - Every family CI runs beyond the derived list: read off this PR's check-runs. --- _Generated by [Claude Code](https://claude.ai/code/session_01FEkQ5pJkb8Rbcrj6yEXfiA)_ <!-- signed: domain:skills#1 · os-project-manager · session_01FEkQ5pJkb8Rbcrj6yEXfiA --> --------- Co-authored-by: Claude <noreply@anthropic.com>
…r id in the hook find example (objectstack-ai#34125) <!-- claude-projects-attribution: {"github_login":"os-steve"} --> _Requested by **Steve** · [project thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9JvBUHu5JZehUFbNWsJ7EFW)_ Fixes objectstack-ai#33730 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:两个已发布技能文档里的查询示例。filters.md 的会话令牌示例从 `owner` 改为平台的归属列 `owner_id`;data-hooks.md 的 `find` 示例先从钩子上下文取 `ctx.session?.userId` 绑定到 `uid`,取不到就提前返回,不再用未定义的变量。 - 为什么改:PR objectstack-ai#33726 复审指出这两个示例照抄会出错:`owner` 列平台并不提供,`uid` 是个未定义变量。 - 风险与回滚:只改文档示例和一个 patch changeset,不动代码;回滚就是 revert 本 PR。 - 先看:`skills/objectstack-data/references/data-hooks.md` 第 298–300 行,`skills/objectstack-query/rules/filters.md` 第 166 与 176 行。 - 两分钟验证:`node scripts/check-skills-token-ratchet.mjs`,预期两个文件都在上限内(filters.md 2469/2473,data-hooks.md 10003/10011)。 - 需要你做的:无,席位落地。 ## What changes - `skills/objectstack-query/rules/filters.md`: the session-token example now filters `owner_id: '{current_user_id}'`. `owner_id` is the platform's provisioned ownership column (`packages/objectql/src/registry.ts:1643-1649`, auto-added and stamped to the acting user on insert by SecurityPlugin; the doc block at `registry.ts:1334-1338` names it the canonical reassignable owner). The tokens' own source uses the same example (`packages/spec/src/data/context-tokens.zod.ts:27`). The surrounding "Session tokens" paragraph still reads true and is unchanged. - `skills/objectstack-data/references/data-hooks.md`: the `find` example's unbound `uid` is now bound from the hook context before the read: `const uid = ctx.session?.userId;` then `if (!uid) return;`, and the `find` line itself is unchanged. The hook context names the caller's id `HookContext.session.userId` (`packages/spec/src/data/hook.zod.ts:1411-1412`: `session: z.object({ userId: z.string().optional(), …`), and the retired-roles prescription at `hook.zod.ts:1617` says "read `ctx.session.userId` / `ctx.session.isSystem`". Optional chaining because the same file teaches that `ctx.session` is absent on system writes; the example returns early when there is no id. - `.changeset/33730-skills-query-hook-examples.md`: `@objectstack/skills` patch. ## Tests Docs-only diff; no test file is touched and no forced test edit exists. No eval prompt is added: both edits correct an existing example and add no new teaching. Readings on origin/main `f81e4b6c` (before) and this head (after): | File | Lines | Bytes | Tokens / ceiling | |:--|:--|:--|:--| | `skills/objectstack-query/rules/filters.md` | 209 → 208 | 9892 → 9876 | 2473 → 2469 / 2473 | | `skills/objectstack-data/references/data-hooks.md` | 893 → 895 | 39960 → 40011 | 9990 → 10003 / 10011 | | Whole package, sum of all `SKILL.md` | 4596 → 4596 | — | — | | Whole shipped bundle (ratchet total) | — | — | 246787 → 246796 | No ratchet row moved. filters.md sat at zero headroom, so the 3 bytes of the `owner_id` rename are paid in place: the Parameterised-tokens bullet drops its third restatement of `{30_days_ago}` (the token keeps its homes at line 71 and in the code example at line 157 of the same file). Net, filters.md is 16 bytes smaller (9892 → 9876). data-hooks.md's two new lines fit its existing headroom; nothing was cut there. ## Acceptance notes - Authored by an isolated os-dev subagent pinned to the contract-review tier on this branch, because this thread is served below the tier `dispatch-gates --tier` mandates for `skills/**`; the thread did the push, gates and relay. The seat agreed this route before the claim. - The changeset body opens with the two declaration lines and carries no title line. - Review round 1 (contract review record 6900946687): the hook example now reads the id first and returns early without one. A security item is with the owner seat. ## Verification All local readings are on head `2d1bc82e` (the round-1 commit on top of `d057b5bc`, which is author commit `0c58bfe6` merged with origin/main `385ea1cc`; origin/main has not moved since). Build closure under `os-verify-lock`: `pnpm build` VERDICT command-exit 0 (13m14s), then the packages main moved and their consumers (`...@objectstack/objectql`, `...@objectstack/metadata-protocol`) rebuilt, VERDICT command-exit 0; the round-1 commit touches only a skills file. `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` derives the same 46 families on this head; all 46 plus `check:skill-docs` and `check:skill-examples` ran, every one exit 0. `--ran` reconciles: "46 derived famil(ies) accounted for — 46 run, 0 NOT-MEASURED (a DERIVED zero)". <details><summary>Gate run on 2d1bc82 (48 commands, exit codes captured before any pipe)</summary> ```text node scripts/check-adr-0087-registration.mjs --base origin/main :: exit 0 node scripts/check-adr-0087-registration.mjs --self-test :: exit 0 node scripts/check-changeset-no-major.mjs --base origin/main :: exit 0 node scripts/check-closing-keyword-parity.mjs :: exit 0 node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0 node scripts/check-comment-mask-corpus.mjs :: exit 0 node scripts/check-doc-route-spelling.mjs --advisory :: exit 0 node scripts/check-doc-route-spelling.mjs --self-test :: exit 0 node scripts/check-dts-emitted.mjs --self-test :: exit 0 node scripts/check-empty-changeset.mjs --base origin/main :: exit 0 node scripts/check-empty-changeset.mjs --self-test :: exit 0 node scripts/check-skills-token-ratchet.mjs :: exit 0 node scripts/check-skills-token-ratchet.mjs --self-test :: exit 0 node scripts/ci/assert-turbo-remote-cache.mjs --self-test :: exit 0 node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0 node scripts/ci/prune-turbo-cache.mjs --self-test :: exit 0 node scripts/ci/snapshot-next.mjs --self-test :: exit 0 node scripts/pm/check-governed-queue-guard.mjs --self-test :: exit 0 node scripts/pm/release-rehearsal-clone.mjs --self-test :: exit 0 node scripts/release-pending-publish.mjs --self-test :: exit 0 pnpm --filter @objectstack/lint run check:doc-formula-expressions :: exit 0 pnpm --filter @objectstack/spec run check:skill-refs :: exit 0 pnpm check:agent-test-spelling :: exit 0 pnpm check:changeset-gate-self-tests :: exit 0 pnpm check:ci-filter-parity :: exit 0 pnpm check:closed-ceremony-text :: exit 0 pnpm check:corpus-claim-drift :: exit 0 pnpm check:cross-package-test-inputs :: exit 0 pnpm check:doc-authoring :: exit 0 pnpm check:driver-memory-census :: exit 0 pnpm check:dts-closure :: exit 0 pnpm check:dual-build-cjs-loads :: exit 0 pnpm check:gitlink-declared :: exit 0 pnpm check:lean-entry-closure :: exit 0 pnpm check:nul-bytes :: exit 0 pnpm check:pm-governed-merges :: exit 0 pnpm check:pm-skill-id-lint :: exit 0 pnpm check:published-files :: exit 0 pnpm check:refd-timer-probe :: exit 0 pnpm check:role-word :: exit 0 pnpm check:skill-compatibility :: exit 0 pnpm check:skill-frame-sync :: exit 0 pnpm check:skill-identifier-liveness :: exit 0 pnpm check:skill-links :: exit 0 pnpm check:sourcemap-no-sources-content :: exit 0 pnpm check:watch-hint-literal :: exit 0 pnpm --filter @objectstack/spec run check:skill-docs :: exit 0 pnpm --filter @objectstack/spec run check:skill-examples :: exit 0 ``` </details> CI families are not re-run locally; read the PR's check-runs. <!-- signed: domain:skills#2 · os-steve · session_01ADHkmPNsfEF3TsQJfFdSGv --> --------- Co-authored-by: Claude <noreply@anthropic.com>
Requested by Leehom · project thread
Fixes #33722
Clause-②: no
Metadata-protocol: none
Signed: domain:skills#1 · os-project-manager · session_01FEkQ5nj2HhB4M8Anj58gqj
维护者速读
objectstack-data的 hooks 参考(references/data-hooks.md)里ctx.api.object('task').find(...)示例按负责人过滤时用的是自造的owner字段,改成平台注入的owner_id;顺带把同一技能 eval 6 里「owner是持有工单的人」这个自造负责人字段改名为reviewer(与负责人无关的另一个角色),其考点deleteBehavior不变。owner_id、不另造负责人字段;这个示例还在教另一套写法。实测:在没有owner字段的对象上,旧写法被拒(400 INVALID_FILTER),新写法正确返回。skills/objectstack-data/references/data-hooks.md第 304 行;skills/objectstack-data/evals/objects-fields-relationships.jsoneval 6。git grep -nE "owner: uid|is the agent who holds" -- skills/objectstack-data,预期零命中(退出码 1)。skills/**),席位的达档契约复审 PASS 记录在案后,按其档位落地(Tier H 请合并;低风险臂读作 Tier S 则由席位入队)。What changes
skills/objectstack-data/references/data-hooks.mdctx.api.object(name)query-shape blockfind({ where: { $and: [{ done: false }, { owner: uid }] } }){ owner_id: uid }skills/objectstack-data/evals/objects-fields-relationships.jsonowner"is the agent who holds it", a hand-named record owner as a requireduserfieldreviewer"is the lead who signs it off", a role apart from the owner.changeset/33722-skills-data-hooks-owner-id-filter.md'@objectstack/skills': patchThe data rule is not restated; the example only stops contradicting it (
skills/objectstack-data/SKILL.md:313, Record owner row).Sweep of
skills/objectstack-data/**(order ruling 3)git grep -nE "\b(owner|assigned_to|assignee)\b"over the bundle onmain@ 48e6959, every hit read:owneras "the agent who holds" the ticket, and the reference answer made it arequireduserfield. That is the hand-named owner family: a model following SKILL.md:313 ("also when the request says assignee ... never a hand-added owner field") answersowner_idand contradicts this eval. The eval testsdeleteBehavioron auserfield, so the field is nowreviewer, a handler the request names apart from the owner. Its assertions name no field and are unchanged; self-check: everymust_containliteral is still in itsexpected_output, nomust_not_containliteral is.owner_id, queue claim, theassigned_toprohibition);examples-objects.md:88(// assignee: the injected owner_id);rules/relationships.md85-108, 369 ("never an owner field copied by hooks",owner_id);rules/security.md84-85, 111-199 (owner_idpolicies, theownermembership tier);references/seeds.md:141; data-hooks.md 769-771 (owner_id); evals that forbidassigned_to/assignee:or expectowner_id(README:9; hooks-security-seeds-datasources 37, 57, 77-81, 127, 167, 177-191; objects-fields-relationships 123, 229-233, 298, 334-342).Tests
Skill text and eval only: no package is touched, so no package test, typecheck or ablation is owed. The order asked for the filter shape the hook API on
mainreally accepts, read off the runtime rather than the skill:ctx.api.object(name).find(q)isObjectRepositoryFacet.find(packages/objectql/src/engine-object-repository.ts:55), which spreadsqintoengine.find(objectName, { ...q, context });wherewith$andis the engine's filter DSL.ObjectQL,SqlDriverbetter-sqlite3,QuickJSScriptRunner,bindHooksToEngine, hook passed throughHookSchema.parse;taskrows u1/open, u1/done, u2/open), run withpnpm --filter @objectstack/runtime exec vitest run --maxWorkers=2 src/sandbox/zz-probe-33722.test.tsafterturbo run build --filter=@objectstack/runtime^...under the verify lock (VERDICT command-exit 0): exit 0, 2/2.find({ where: { $and: [{ done: false }, { owner_id: uid }] } })in abeforeInsertbody:found = 1(the one open u1 task).{ owner: uid }on the sametask(noownerfield): the write is refused,mapDataErroranswers400INVALID_FILTER("A filter on object 'task' names a column the database could not resolve ...").Acceptance notes
uidstays an unbound name, as the block's other lines use bareid; binding it (ctx.user?.id) was not ordered and an undefined comparand is its own question.Verification
data-hooks.md892 / 892 lines, 40013 / 40016 bytes, 10004 / 10004 tokens (ceiling 10011, untouched). Eval file 348 / 348 lines, 21847 / 21862 bytes. Package total, allskills/*/SKILL.md: 4588 lines and 236182 bytes before and after.check-skills-token-ratchetexit 0;check-skill-line-ratchetexit 0.dispatch-gates --tier: MANDATORYclaude-fable-5-2(skills/**, clause ①, no one-line exit). This thread ran on the configured session model; the at-tier contract review is the seat's.check-governed-merges.mjs --branch claude/project-thread-0h6njx: GOVERNED,skills/**×2, +13 / -3 over 3 files, under the human-merge threshold; low-risk arm NOT MEASURED from a branch (fail closed to Tier H). The--prreading is in the os-dev-report.dispatch-gates --commands) on head 5744090, afterturbo run build --filter=@objectstack/lint... --filter=@objectstack/formula...: 46 derived, 45 exit 0, 1 exit 3 NOT MEASURED (check:dual-build-cjs-loadsreads every package'sdist; no package is touched, CI runs it).dispatch-gates --ran: 46 accounted for, 45 run, 1 NOT-MEASURED, 0 UNRUN.46 derived gates, each with its exit code
Generated by Claude Code
🤖 Generated with Claude Code